<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="./common/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0033)http://xm.ganji.com/vip/index.php -->
<HTML>
	<HEAD>
		<META content="IE=7.0000" http-equiv="X-UA-Compatible">
		<TITLE>会员中心——消息管理</TITLE>
		<META content="text/html; charset=utf-8" http-equiv=Content-Type>
		<LINK rel=stylesheet type=text/css href="css/vip.css">
		<META name=GENERATOR content="MSHTML 8.00.7601.17537">

		<script type="text/javascript">
	function check() {
		var confirmBox = document.getElementById("allselect");//
		if (confirmBox.checked) {
			var arryObj = document.getElementsByName("chkbox");
			for ( var i = 0; i < arryObj.length; i++) {
				if (typeof arryObj[i].type != "undefined"
						&& arryObj[i].type == 'checkbox')
				arryObj[i].checked = true;
			}
		} else {
			var arryObj = document.getElementsByName("chkbox")
			for ( var i = 0; i < arryObj.length; i++) {

				if (typeof arryObj[i].type != "undefined"
						&& arryObj[i].type == 'checkbox')
					arryObj[i].checked = false;
			}
		}
	}
</script>

	</HEAD>
	<BODY>
		<DIV class=blueBar></DIV>
		<DIV class="globalContainer clearfix">
			<!--header-->
			<DIV class=head>
				<DIV class=headNav>
					<SPAN class="fr viptop"><A class=pub
						href="<s:url action="goChooseTypeAction"></s:url>" target=_blank>免费发帖</A>
						<A
						href="<s:url action="goVipAction"><s:param name="userId"> 
                       			 	<s:property value="user.id"/> 
                    			</s:param> 
</s:url>"><s:property
								value="user.username" /> </A> <A
						href="<s:url action="logoutAction"></s:url>">退出帐户</A> </SPAN><SPAN
						class=where><A href="vip.jsp">会员中心首页</A> </SPAN>
				</DIV>
				<H1 class=vipLogo>
					<A title=返回首页 href="index.jsp"></A>
				</H1>
			</DIV>
			<!--end-->
			<DIV class=mainContainer>
				<DIV class=rightCol>
					<DIV class=right_top>
						<SPAN style="MARGIN-RIGHT: 15px" class=fr></SPAN>
						<SPAN class="button on"><A class=btn-b
							href="<s:url action="viewAllMessagesAction"></s:url>">收到的消息</A>
						</SPAN>

					</DIV>
					<DIV>
						<DIV id=object_list class=rightBody>
							<s:form id="productForm" action="deleteSelectedMessagesAction"
								method="post" enctype="multipart/form-data">
								<s:iterator value="pageBean.list" status="message">
									<TABLE class=t-comment border=0 cellSpacing=0 cellPadding=0
										width="100%">
										<!--帖子循环开始 -->
										<TBODY>
											<TR>
												<TD class=w01>
													<INPUT type="checkbox" id="chkbox" name="chkbox" value="<s:property value="id" />">
												</TD>
												<TD>
													<SPAN class="fr fc-c9"> <A
														href="<s:url action="deleteMessageAction"><s:param name="messageId"> 
                       			 	<s:property value="id"/> 
                    			</s:param> 
</s:url>" onclick="return confirm('确定删除该消息?')?true:false;">删除</A> </SPAN><s:property value="message" /> 
													&nbsp;&nbsp;&nbsp;&nbsp;(来自：<s:property value="userBySender.username" />)
													<DIV class="tbr mt5">
														<SPAN class="fr fc-c9"> </SPAN>(
<a href="<s:url action="viewGoodAction"> 
                     			<s:param name="goodId"> 
                       			 	<s:property value="good.id"/> 
                    			</s:param> 
                					</s:url>" target="blank"><s:property value="good.title" /></font> </a>)
														<SPAN class=fc-aaa><s:date format="yyyy-MM-dd"
																name="time" /> </SPAN>
													</DIV>
												</TD>
											</TR>
											<!--帖子循环结束 -->
										</TBODY>
									</TABLE>
								</s:iterator>
							<DIV class=tit>
								<SPAN class=fr>第<s:property value="pageBean.currentPage"/>-<s:property value="pageBean.totalPage"/>页，共<s:property value="pageBean.allRow"/>条</SPAN>
								<INPUT id=ev_checkbox_all name="allselect" type=checkbox
									onclick="check()">
								全选
<!--<A id=ev_delete_all class=delete type="submit" name="submit"
href="#" tip="c">删除</A>
--><input type="submit" name="submit" value="删除" onclick="return confirm('确定删除所选消息?')?true:false;"/>
							</s:form>
							</DIV>
							<!--翻页-->
							<DIV class=rightfoot>
								<DIV class=fenye>
        <s:if test="%{pageBean.currentPage == 1}">
            第一页 上一页
        </s:if>
        <s:else>
            <A href="viewAllMessagesAction.action?page=1">第一页</A>
            <A href="viewAllMessagesAction.action?page=<s:property value="%{pageBean.currentPage-1}"/>">上一页</A>
        </s:else>
        <s:if test="%{pageBean.currentPage != pageBean.totalPage}">
            <A href="viewAllMessagesAction.action?page=<s:property value="%{pageBean.currentPage+1}"/>">下一页</A>
            <A href="viewAllMessagesAction.action?page=<s:property value="pageBean.totalPage"/>">最后一页</A>
        </s:if>
        <s:else>
            下一页 最后一页
        </s:else>
								</DIV>
							</DIV>
							<!--翻页结束-->
						</DIV>
					</DIV>
				</DIV>
				<!--左侧菜单开始 -->
				<s:include value="include/leftside.jsp"></s:include>
				<!--左侧菜单结束 -->
			</DIV>
			<!--底部开始 -->
			<!--底部结束 -->
		</DIV>
		</SPAN>
		<div align="center">
			<s:include value="include/footer.jsp"></s:include>
		</div>
	</BODY>
</HTML>
